//
//  GetService.m
//  YYZB
//
//  Created by BY_R on 16/3/31.
//
//

#import "GetService.h"

@implementation GetService
-(void)getService:(void (^)(NSArray *items, NSError *error))completionHanlder{
    NSString *URL = @"Service/GetServiceCat1List";
    NSDictionary *params = @{};
    NSString *URLString = [self formattedURLString:params method:URL sessionNeeded:NO];
    [self sendHTTPGetRequest:URLString completionHandler:^(id result, NSError *error) {
        if (error != nil) {
            completionHanlder(nil, error);
        } else {
            NSError *err;
            NSArray *items = [self unboxedValue:result error:&err];
            completionHanlder(items, err);
        }
    }];
}

-(void)getsmallService:(void (^)(NSArray *items, NSError *error))completionHanlder{
    NSString *URL = @"Service/GetServiceCatList";
    NSDictionary *params = @{};
    NSString *URLString = [self formattedURLString:params method:URL sessionNeeded:NO];
    [self sendHTTPGetRequest:URLString completionHandler:^(id result, NSError *error) {
        if (error != nil) {
            completionHanlder(nil, error);
        } else {
            NSError *err;
            NSArray *items = [self unboxedValue:result error:&err];
            completionHanlder(items, err);
        }
    }];
}
@end
